#include <string.h>

char *strcpy(char *dest,const char *src)
{
	char *s1 = dest;
	while(*dest++ = *src++);
	return s1;
}

size_t strlen(const char *s1)
{
	size_t size_s1 = 0;
	while(s1[size_s1++]);
	return size_s1;
}

int strcmp(const char *s1,const char *s2)
{    
	for(; *s1 == *s2; ++s1, ++s2)
        if(*s1 == 0)
            return 0;
    return *(unsigned char *)s1 < *(unsigned char *)s2 ? -1 : 1;
}

void *memcpy(void *dest,void *src,size_t count)
{
	char *dest_p = (char *)dest;
	char *src_p = (char *)src;

	for(;count != 0;count--)*dest_p++ = *src_p++;
	return dest;
}

void *memset(void *dest,char value,size_t count)
{
	char *dest_p = (char *)dest;
	for(;count != 0;count--)*dest_p = value;
	return dest;
}
